#ifndef GAME_H
#define GAME_H
#include "IGame.h"
#include "StompedReality/Core.h"
namespace Json
{
class Value;
}
namespace StompedReality
{
class GameTime;
namespace Graphics
{
class RenderSystem;
}
namespace Input
{
class InputSystem;
}
namespace Core
{
class MessageSystem;
class Component;
template <class T>
class ObjectPoolManager;
class TaskManager;
class SystemMessageProcessor;
}
namespace Asset
{
class AssetManager;
}
namespace Utility
{
class FileSystem;
}
class DLL_EXPORT Game : public IGame
{
 protected:

  StompedReality::Core::TaskManager* m_TaskManager;
  StompedReality::Core::SystemMessageProcessor* m_SystemMsgProcessor;
  StompedReality::Core::ObjectPoolManager<StompedReality::Core::Component>* m_ComponentSystem;
  StompedReality::Core::MessageSystem* m_MessageSystem;
  StompedReality::Utility::FileSystem* m_FileSystem;
  StompedReality::GameTime* m_GameTime;
  StompedReality::Input::InputSystem* m_InputSystem;
  StompedReality::Graphics::RenderSystem* m_RenderSystem;
  StompedReality::Asset::AssetManager* m_AssetManager;

  bool m_Initialized;

 public:

  Game( );
  virtual ~Game( );
  virtual bool ParseConfig ( const char* fileName );

  void LoadObject( const char* file );
  void LoadObjects ( Json::Value itemList );

  bool IsInitialized( );

 public:

  StompedReality::GameTime* getGameTime( );
  StompedReality::Core::ObjectPoolManager<StompedReality::Core::Component>* getComponentSystem( );
  StompedReality::Graphics::RenderSystem* RenderSystem( );
  void setRenderer ( StompedReality::Graphics::RenderSystem* render );
  StompedReality::Core::MessageSystem* MessageSystem( );
  StompedReality::Input::InputSystem* InputSystem( );
  StompedReality::Core::SystemMessageProcessor* getSysMsgProcessor( );
  StompedReality::Utility::FileSystem* getFileSystem( );
  StompedReality::Asset::AssetManager* getAssetManager( );

 public:

  // loop & other stuff
  void loop( );
};

}
#endif // GAME_H
